/*
 * CTDR_Field.h
 *
 *  Created on: 1 déc. 2010
 *      Author: mbenoit
 */
//////////////////////////////////////////////////////////////////////////
// Source file : class CTDR_Field					//
// This class represent the CTDR_Field in the CZT detector. CTDR_Field 	//
// data are read from a ROOT  file and stored in a TTree.This class pass//
// to the simulation the value of the CTDR_Field at a position x,y,z,	//
// on demand. This class is similar to the class Detecteur.		//
//////////////////////////////////////////////////////////////////////////

#ifndef CTDR_FIELD_H_DEF
#define CTDR_FIELD_H_DEF

#include "TClass.h"
#include "TMath.h"

class CTDR_Field{

      protected:

          double Ex; // X field
	      double Ey; // Y field
	      double Ez; // Z field
		  double LX; // Size in X
		  double LY; // Size in Y
		  double LZ; // Size in Z



      public:
             CTDR_Field(double LX, double LY, double LZ);
             CTDR_Field();
             double GetEx();
             double GetEy();
             double GetEz();
             double GetE(){return TMath::Sqrt((Ex*Ex+Ey*Ey+Ez*Ez));};
             double GetLz();
             void SetEx(double Ex);
             void SetEy(double Ey);
             void SetEz(double Ez);
             virtual void SetChamp(double x, double y , double z){};

     		 //ClassDef(CTDR_Field, 0) // The electric field
             };

#endif

